<template>
    <div>
        <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item>首页</el-breadcrumb-item>
            <el-breadcrumb-item>参数管理</el-breadcrumb-item>
            <el-breadcrumb-item>参数列表</el-breadcrumb-item>
        </el-breadcrumb>
        <el-alert title="注意:只允许为第三季分类设置相关参数" type="warning"></el-alert>
        <el-cascader v-model="cascadervalue" :options="catelist" :props="cateprops" @change="handleChange"></el-cascader>
    </div>
</template>

<script>
export default {
    data () {
        return {
            catelist: [],
            cateprops: {
                value: 'cat_id',
            },
            cascadervalue: ''
        }
    },
    created () {
        this.getCateList()
    },
    methods: {
        addRole () { },
        async getCateList () {
            const { data: res } = await this.$http.get('categories')
            if (res.meta.status !== 200) return this.$message.error('获取角色列表错误')
            console.log('获取分类参数', res);
            this.catelist = res.data
        },
        handleChange () {

        }
    }
}
</script>

<style lang="less" scoped>
.el-alert {
    margin-top: 15px;
}
</style>